package stud.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import stud.aistar.entity.CodeStatus;
import stud.aistar.entity.ResultList;
import stud.aistar.service.IDoctorPatientVoService;
import stud.aistar.vo.CountTimeVo;

import java.util.List;

/**
 * *
 *
 * @ClassName :wangyu
 * @Description :医生某段时间的挂号数
 * @Author
 * @Date2019/10/12 10:12
 * @Version V1.0
 */
@Controller
public class DoctorTimeController {

    @Autowired

    private IDoctorPatientVoService dpvService;

    @RequestMapping("/timeCount")
    @ResponseBody
    public ResultList timeCount(@RequestParam String docId){

        List<CountTimeVo> list = dpvService.findCountAndTime(Integer.valueOf(docId));

        return new ResultList(CodeStatus.OK,true,"返回成功",list);
    }

}
